package com.itheima;

import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest;

@SpringBootTest
public class ThreadLocal {

    private static java.lang.ThreadLocal<Integer> DD=new java.lang.ThreadLocal<>();

    @Test
    public  void testThreadLocal() {
//        当前线程
        Thread thread = Thread.currentThread();
        DD.set(123);
        Integer i = DD.get();
        System.out.println(i);
        DD.remove();


    }



}
